package com.imooc;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import tk.mybatis.spring.annotation.MapperScan;

/*用于启动SpringBoot的项目*/
/*是SpringBoot项目中一个可运行的类  ====> 运行的话 就需要一个 main方法 */
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
@MapperScan(basePackages = "com.imooc.mapper")
/*
* 扫描所有包，以及相关组件包
* */
@ComponentScan(basePackages = {"com.imooc","org.n3r.idworker"})
/**
 * 开启基于Redis的SpringSession
 */
@EnableRedisHttpSession
public class Application {
    public static void main(String[] args) {
        // run 方法会返回一个 正在运行的 上下文对象 ApplicationContext
        SpringApplication.run(Application.class,args);
    }
}
